package com.spring.model;

import java.util.Date;


import org.hibernate.validator.constraints.Length;
import org.hibernate.validator.constraints.NotEmpty;




public class User {
	
	@NotEmpty
	private int id;
	
	@NotEmpty(message="bu wei kong")
	@Length(max=6)
	private String password;
	
	@NotEmpty
	private String name;
	
	
	@NotEmpty
	private Date birthday;
	
	
	public User(){}
	
	public int getId() {
		return id;
	}
	public void setId(int id) {
		this.id = id;
	}
	public String getPassword() {
		return password;
	}
	public void setPassword(String password) {
		this.password = password;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	
	public Date getBirthday() {
		return birthday;
	}
	public void setBirthday(Date birthday) {
		this.birthday = birthday;
	}
	
	@Override
	public String toString() {
		return "id:"+id+",name:"+name+",password:"+password+",birthday:"+birthday;
	}
	
}
